﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace BuildServer.Models
{
    public class BuildTemplate
    {
        [Key]
        public int Id { get; set; }

        [Required(ErrorMessage = "Template Name is required")]
        [Display(Name = "Template Name")]
        public string Name { get; set; }

        [Required(ErrorMessage = "Working Directory is required")]
        [Display(Name = "Working Directory")]
        public string WorkingDirectory { get; set; }

        [Required(ErrorMessage = "Build Script is required")]
        [Display(Name = "Build Script")]
        [DataType(DataType.MultilineText)]
        public string BuildScript { get; set; }

        [Display(Name = "Build Props")]
        [DataType(DataType.MultilineText)]
        public string BuildProps { get; set; }

        /// <summary>
        /// Build definitions for this template
        /// </summary>
        public virtual ICollection<BuildDefinition> BuildDefinitions { get; set; }
    }
}